import smsAdminApiConfig from '@/core/sms/generated/apiconfig/smsAdminApiConfig'
import serverApiMockUtils from '../../utils/serverApiMockUtils'
import mockProdServerUtils from '../../utils/mockUtils'
import { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
import SmsSendRecordResponse from '@/core/sms/generated/types/model/response/SmsSendRecordResponse'

const content: SmsSendRecordResponse[] = []
for (let i = 0; i < 10; i++) {
	content.push({
		id: i.toString(),
		smsAppId: i.toString(),
		identifier: i.toString(),
		phoneNumber: `phoneNumber_短信发送记录_${i.toString()}`,
		content: `content_短信发送记录_${i.toString()}`,
		supplierType: `supplierType_短信发送记录_${i.toString()}`,
		status: `status_短信发送记录_${i.toString()}`,
		resultRemark: `resultRemark_短信发送记录_${i.toString()}`,
		planSendTime: Mock.Random.integer(1, 2) == 1 ? null : `planSendTime_短信发送记录_${i.toString()}`,
		arrivalTime: Mock.Random.integer(1, 2) == 1 ? null : `arrivalTime_短信发送记录_${i.toString()}`,
		deleteFlag: '0',
		createTime: new Date().getTime().toString(),
		updateTime: new Date().getTime().toString(),
		rowVersion: 1,
	} as SmsSendRecordResponse)
}

const mockList: MockMethod[] = [...serverApiMockUtils.getDefaultServerApi(smsAdminApiConfig.smsSendRecord, content)]

mockProdServerUtils.addMockList(...mockList)

export const items = content
